<%-- 
    Document   : feUserUpdate
    Created on : Aug 27, 2011, 11:15:40 PM
    Author     : Valentina
--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="default.css" rel="stylesheet" type="text/css" />
        <title>User List Update</title>
    </head>
    <body>

        <jsp:include page="/WEB-INF/frontend/commons/header.jspf"></jsp:include>

        <table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td><img src="images/spacer.gif" alt="" width="100" height="30" /></td>
                        </tr>
                        <tr>
                            <td class="title">Update User List</td>
                        </tr>

                        <tr>
                            <td>
                                <form action="UserUpdateServlet?iduser=${user.id}" method="POST">
                                    <p>Name <input type="text" name="name" value="${user.name}" size="20" /></p>
                                    <p>Login <input type="text" name="login" value="${user.login}" size="20" /></p>
                                    <p>Password <input type="text" name="password" value="${user.password}" size="20" /> </p>
                                    <p>Group
                                        <select name="idGroup">
                                            <c:forEach var="group" items="${groups}">
                                                <c:choose>
                                                    <c:when test="${group.id==user.idGroup}">
                                                        <option value="${group.id}" selected="${user.idGroup}">${group.name}</option>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <option value="${group.id}">${group.name}</option>
                                                    </c:otherwise>
                                                </c:choose>
                                            </c:forEach>

                                        </select>
                                    </p>
                                    <input type="submit" value="Update" />
                                </form>                                     

                            </td>
                        </tr>   

                    </table>
                </td>
            </tr>
        </table>

        <jsp:include page="/WEB-INF/frontend/commons/footer.jspf"></jsp:include>

    </body>
</html>
